package com.itmk.business.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itmk.business.product.entity.PurchasingPrice;
import com.itmk.vo.req.ProductReqVO;
import com.itmk.vo.resp.PurchasingPriceRespVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface PurchasingPriceMapper extends BaseMapper<PurchasingPrice> {
    List<Object> getpriceListsByProcedure(@Param("productReqVO") ProductReqVO vo);



    @Select("select pp.* ,p.product_num,product_name,c.contact_name from purchasing_price as pp inner join product as p " +
        "on pp.product_id=p.product_id left join contact as c on " +
            "pp.contact_id=c.contact_id where pp.id=#{id}"
    )
    PurchasingPriceRespVO getDetailPriceById(@Param("id") Long id);
}
